<extend name="Layout:list" />
<block name="title"><title>栏目管理</title></block>
<block name="subnav">
    <a class="add fb" href="__MODULE__/Category/add?<?php echo $query_string; ?>"><em>添加栏目</em></a>　
    <a class="on" href="__MODULE__/Category/index?<?php echo $query_string; ?>"><em>栏目管理</em></a>
</block>
<block name="main">
    <form name="myform" action="__CONTROLLER__/listorder" method="post">
        <div class="table-list">
            <table width="100%" cellspacing="0">
                <thead>
                    <tr>
                        <th width="38">排序</th>
                        <th width="30">ID</th>
                        <th>栏目名称</th>
                        <th>描述</th>
                        <th>管理操作</th>
                    </tr>
                </thead>
                <tbody>
                    <?php  foreach ($terms as $key => $value) { ?>
                    <tr>
                        <td align="center">
                            <input name="listorder[<?php echo $value['id']; ?>]" type="text" size="3" value="<?php echo $value['listorder']; ?>" class="input-text-c input-text">
                        </td>
                        <td align="center"><?php echo $value['id']; ?></td>
                        <td><?php echo cat_empty_deal($value, $terms[$key+1]['parentid']); ?><?php echo $value['catname']; ?></td>
                        <td align="center"><?php echo $value['description']; ?></td>
                        <td align="center">
                            <a href="__MODULE__/Category/edit?id=<?php echo $value['id']; ?>">修改</a> | <a onclick="return ConfirmDel();" href="__MODULE__/Category/delete?id=<?php echo $value['id']; ?>">删除</a>
                        </td>
                    </tr>
                    <?php } ?>
                </tbody>
            </table>
        </div>
        <div class="btn">
            <input type="submit" class="button" name="排序" name="dosubmit" /> &nbsp;
        </div>
    </form>
</block>